package com.tedu.bill;

/**
 * Author：毕龙
 * Date: 2024/3/17 16:47
 */
public class TestOperatorLogic1Or {
    public static void main(String[] args) {

        System.out.println(true | true);//true
        System.out.println(true | false);//true
        System.out.println(false | true);//true
        System.out.println(false | false);//false

        int a = 10;
        int b = 3;
        //测试非短路
        System.out.println( a > b | a++ == b);//true
        System.out.println(a);//11


        System.out.println(a < b | a++ > b++);//true
        System.out.println(a);// 12
        System.out.println(b);//  4

        // 0000 0001
        // 0000 0010
        // 0000 0011
        System.out.println(1 | 2);// 3
        System.out.println(7 | 15);//15
        System.out.println("====================");
        //1111 1111
        //0110 1110
        //1001 0010
        //1001 0010
        //0110 1110
        System.out.println(-1 | -110);//-1
        //0001 0111          0011 0111
        //1110 1001  -23     1100 1001

        System.out.println(-23 | -55);//-23


    }
}
